package com.zhangtai.modules.service.employee;


import com.zhangtai.modules.entity.employee.EmployeeBpmEntity;
import com.zhangtai.utils.PageResult;
import com.zhangtai.utils.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;


/**
 * 
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2020-07-03 15:15:16
 */
@Api(tags = "产品接口")
public interface EmployeeBpmService {

    @GetMapping("/findEmployeeBpmList")
    @ApiOperation(value = "分页查询")
    PageResult queryPage(@RequestParam(value = "keyword", required = false) String keyword,
                         @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                         @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize);

    @GetMapping("/infoEmployeeBpm")
    @ApiOperation(value = "根据id查找")
    EmployeeBpmEntity getByIdE(@RequestParam("id") Long id);

    @PostMapping("/saveEmployeeBpm")
    @ApiOperation(value = "保存")
    R saveE(@RequestBody EmployeeBpmEntity entity);

    @PostMapping("/updateEmployeeBpm")
    @ApiOperation(value = "修改")
    @Transactional(propagation = Propagation.REQUIRED)
    R updateByIdE(@RequestBody EmployeeBpmEntity entity);

    @GetMapping("/deleteOneEmployeeBpm")
    @ApiOperation(value = "根据ID删除")
    R removeOneById(@RequestParam("id") Long id);

    @PostMapping("/deleteEmployeeBpms")
    @ApiOperation(value = "根据ID集合删除")
    R removeByIdsE(@RequestBody List<Long> ids);

//    @GetMapping("/findByOidEmployeeBpmEntity")
//    EmployeeBpmEntity findByOid(@RequestParam("oid") Long oid);
}

